#encoding: utf-8 
<h2>Imágenes</h2>
<fieldset>
	<legend>
		<%= @gallery.name %>
	</legend>

	<div id="paintings">
		<% for painting in @gallery.paintings %>
		<div class="painting">
			<%= image_tag painting.image_url(:thumb) if painting.image? %>
			<div class="name">
				<%= painting.name %>
			</div>
			<div class="actions">
				<%= link_to "Editar", edit_painting_path(:id => painting) %> |
				<%= link_to "Remover", painting, :confirm => 'Usted esta seguro?', :method => :delete %>
			</div>
		</div>
		<% end %>
		<div class="clear"></div>
	</div>

	<p>
		<%= link_to "Agregar Imagen", new_painting_path(:gallery_id => @gallery) %> |
		<%= link_to "Remover Galeria", @gallery, :confirm => 'Usted esta seguro?', :method => :delete %> |
		<%= link_to "Ver Galerias", galleries_path %>
	</p>
</fieldset>
